<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:s="http://sduept.security.el/func">
<h:head>
	<script src="/resources/js/calendarLocale.js"></script>
	<style>
body {
	zoom: 89%;
}
</style>
</h:head>
<h:body>
	<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
		<p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
		<p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
	</p:confirmDialog>
	<h:form id="form">
		<p:growl id="msgs" showDetail="true" />
		<p:toolbar id="toolba">
			<f:facet name="left">
				<p:commandButton value="新建" icon="ui-icon-document"
					update="form:createDetail1 form:createSaveBtn1"
					actionListener="#{operationRiskOutController.create}" oncomplete="PF('createDlg1').show()"
					rendered="#{s:hasPermission(session,'bhyx_bhrb_bhfxgl_xj')}" />
				<p:commandButton update=":form:editDetail Table" oncomplete="PF('editDlg1').show()"
					icon="ui-icon-pencil" value="编辑" disabled="#{operationRiskOutController.selected == null}"
					rendered="#{s:hasPermission(session,'bhyx_bhrb_bhfxgl_bj')}" />
				<p:commandButton value="删除" id="delbtn" icon="ui-icon-trash" update="form:Table msgs toolba"
					actionListener="#{operationRiskOutController.delete}"
					disabled="#{operationRiskOutController.selected == null}"
					rendered="#{s:hasPermission(session,'bhyx_bhrb_bhfxgl_sc')}">
					<p:confirm header=" 提示" message="确定删除该记录吗?" icon="ui-icon-alert" />
				</p:commandButton>
			</f:facet>
			<f:facet name="right">
				<p:outputLabel for="popup3" value="通道中断时间：" />
				<p:calendar id="popup3" navigator="true" value="#{operationRiskOutController.queryDate1}"
					pattern="yyyy-MM-dd" maxdate="Date()">
					<p:ajax event="dateSelect" listener="#{operationRiskOutController.onDateSelectStart}" />
				</p:calendar>
				<p:outputLabel for="popup4" value="至 " style="margin-right:5px;margin-left:5px;" />
				<p:calendar id="popup4" navigator="true" value="#{operationRiskOutController.queryDate2}"
					pattern="yyyy-MM-dd" maxdate="Date()">
					<p:ajax event="dateSelect" listener="#{operationRiskOutController.onDateSelectEnd}" />
				</p:calendar>
				<p:commandButton value="查询" id="query2" update="Table" icon="ui-icon-search"
					actionListener="#{operationRiskOutController.queryByTime}" style="margin-left:5px;">
				</p:commandButton>
			</f:facet>
		</p:toolbar>
		<p:dataTable id="Table" var="item" value="#{operationRiskOutController.outList}"
			rowKey="#{item.id}" emptyMessage="无记录" rows="20" paginator="true"
			paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="20,30,50" paginatorPosition="bottom">
			<p:ajax event="rowSelect" listener="#{operationRiskOutController.onRowSelect}"
				update="form:toolbar"></p:ajax>
			<p:column width="10" headerText="序号 ">
				<h:outputText value="#{item.sort}" />
			</p:column>
			<p:column width="60" headerText="调管范围">
				<h:outputText value="#{item.subCrotrolArea}" />
			</p:column>
			<p:column width="60" headerText="厂站名称">
				<h:outputText value="#{item.subStationName}" />
			</p:column>
			<p:column width="60" headerText="保护通道退出情况">
				<h:outputText value="#{item.channelExit}" />
			</p:column>
			<p:column width="60" headerText="执行时间">
				<h:outputText value="#{item.executionTime}" />
			</p:column>
			<p:column width="60" headerText="通道中断时间">
				<h:outputText value="#{item.channelBreakTime}" />
			</p:column>
			<p:column width="60" headerText="备注">
				<h:outputText value="#{item.remark}" />
			</p:column>
		</p:dataTable>
		<p:dialog widgetVar="createDlg1" header="新建" modal="true" id="createDlg1" width="850">
			<p:toolbar>
				<f:facet name="left">
					<p:commandButton id="createSaveBtn1" value="保存" update="form:Table msgs"
						oncomplete="PF('createDlg1').hide()" actionListener="#{operationRiskOutController.saveNew}"
						icon=" ui-icon-disk" />
				</f:facet>
			</p:toolbar>
			<p:outputPanel id="createDetail1" style="width:100%">
				<p:panelGrid style="width:100%">
					<p:row>
						<p:column>
							<h:outputText value="调管范围:" />
						</p:column>
						<p:column>
							<p:inputText style="width:100%" label="content"
								value="#{operationRiskOutController.created.subCrotrolArea}">
							</p:inputText>
						</p:column>
						<p:column>
							<h:outputText value="厂站名称:" />
						</p:column>
						<p:column>
							<p:inputText style="width:100%" value="#{operationRiskOutController.created.subStationName}" />
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<h:outputText value="保护通道退出情况" />
						</p:column>
						<p:column colspan="5">
							<p:inputText style="width:100%" label="content"
								value="#{operationRiskOutController.created.channelExit}">
							</p:inputText>
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<h:outputText value="执行时间:" />
						</p:column>
						<p:column>
							<p:calendar value="#{operationRiskOutController.created.executionTime}" pattern="yyyy-MM-dd"
								style="width:100%;" maxdate="Date()" />
						</p:column>
						<p:column>
							<h:outputText value="通道中断时间:" />
						</p:column>
						<p:calendar value="#{operationRiskOutController.created.channelBreakTime}"
							pattern="yyyy-MM-dd" style="width:100%;" maxdate="Date()" />
					</p:row>

					<p:row>
						<p:column>
							<h:outputText value="备注:" />
						</p:column>
						<p:column colspan="5">
							<p:inputTextarea rows="5" style="width:100%" label="content"
								value="#{operationRiskController.created.remark}">
							</p:inputTextarea>
						</p:column>
					</p:row>
				</p:panelGrid>
			</p:outputPanel>
		</p:dialog>
		<p:dialog widgetVar="editDlg1" header="编辑" modal="true" id="editDlg1" width="850">
			<p:toolbar>
				<f:facet name="left">
					<p:commandButton id="editSaveBtn1" value="保存" update="form:Table msgs"
						oncomplete="PF('editDlg').hide()" actionListener="#{operationRiskOutController.update}"
						icon=" ui-icon-disk" />
				</f:facet>
			</p:toolbar>
			<p:outputPanel id="editDetail" style="width:100%">
				<p:panelGrid style="width:100%">
					<p:row>
						<p:column>
							<h:outputText value="调管范围:" />
						</p:column>
						<p:column>
							<p:inputText style="width:100%" label="content"
								value="#{operationRiskOutController.selected.subCrotrolArea}">
							</p:inputText>
						</p:column>
						<p:column>
							<h:outputText value="厂站名称:" />
						</p:column>
						<p:column>
							<p:inputText style="width:100%" value="#{operationRiskOutController.selected.subStationName}" />
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<h:outputText value="保护通道退出情况" />
						</p:column>
						<p:column colspan="5">
							<p:inputText style="width:100%" label="content"
								value="#{operationRiskOutController.selected.channelExit}">
							</p:inputText>
						</p:column>
					</p:row>
					<p:row>
						<p:column>
							<h:outputText value="执行时间:" />
						</p:column>
						<p:column>
							<p:calendar value="#{operationRiskOutController.selected.executionTime}" pattern="yyyy-MM-dd"
								style="width:100%;" maxdate="Date()" />
						</p:column>
						<p:column>
							<h:outputText value="通道中断时间:" />
						</p:column>
						<p:calendar value="#{operationRiskOutController.selected.channelBreakTime}"
							pattern="yyyy-MM-dd" style="width:100%;" maxdate="Date()" />
					</p:row>

					<p:row>
						<p:column>
							<h:outputText value="备注:" />
						</p:column>
						<p:column colspan="5">
							<p:inputTextarea rows="5" style="width:100%" label="content"
								value="#{operationRiskController.selected.remark}">
							</p:inputTextarea>
						</p:column>
					</p:row>
				</p:panelGrid>
			</p:outputPanel>
		</p:dialog>
	</h:form>
</h:body>
</html>
